/*
 * @Author: 李天惊 uf_lee@163.com
 * @Date: 2022-09-06 10:30:34
 * @LastEditors: 李小晴 2689279066@qq.com
 * @LastEditTime: 2023-04-04 10:41:48
 * @FilePath: \ahbs\uc_sys\src\api\uc\userDept\index.ts
 * Copyright (c) 2022 by 李天惊 uf_lee@163.com, All Rights Reserved.
 */
import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()

import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 用户部门列表
export const ucUserDeptListAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucUserDeptListAdmin',
      data: data
    }
  })
}

// 用户部门修改
export const ucUserDeptEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucUserDeptEdit',
      data: data
    }
  })
}

// 用户部门新增
export const ucUserDeptAddApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucUserDeptAdd',
      data: data
    }
  })
}

// 用户部门删除
export const ucUserDeptDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucUserDeptDel',
      data: data
    }
  })
}

// 用户部门设置(批量设置)
export const ucUserDeptSetAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'ucUserDeptSetAdmin',
      data: data
    }
  })
}
